package Core;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;

public class BonusList implements List<Bonus>
{
	private List<Bonus> _bonuses; 
	
	public BonusList()
	{
		this._bonuses = new ArrayList<Bonus>();
	}
	
	public int getTotalBonus()
	{
		int totalBonus = 0;
		
		for	(Iterator<Bonus> bonusIterator = this._bonuses.iterator(); bonusIterator.hasNext(); )
		{
			Bonus bonus = bonusIterator.next();
			
			totalBonus += bonus.getAmount();
		}
		
		return totalBonus;
	}
	
	@Override
	public boolean add(Bonus arg0)
	{
		return this._bonuses.add(arg0);
	}

	@Override
	public void add(int arg0, Bonus arg1)
	{
		this._bonuses.add(arg0, arg1);	
	}

	@Override
	public boolean addAll(Collection<? extends Bonus> arg0)
	{
		return this._bonuses.addAll(arg0); 
	}

	@Override
	public boolean addAll(int arg0, Collection<? extends Bonus> arg1)
	{
		return this._bonuses.addAll(arg0, arg1);
	}

	@Override
	public void clear()
	{
		this._bonuses.clear();
	}

	@Override
	public boolean contains(Object arg0)
	{
		return this._bonuses.contains(arg0);
	}

	@Override
	public boolean containsAll(Collection<?> arg0)
	{
		return this._bonuses.containsAll(arg0);
	}

	@Override
	public Bonus get(int arg0)
	{
		return this._bonuses.get(arg0);
	}

	@Override
	public int indexOf(Object arg0)
	{
		return this._bonuses.indexOf(arg0);
	}

	@Override
	public boolean isEmpty()
	{
		return this._bonuses.isEmpty();
	}

	@Override
	public Iterator<Bonus> iterator()
	{
		return this._bonuses.iterator();
	}

	@Override
	public int lastIndexOf(Object arg0)
	{
		return this._bonuses.lastIndexOf(arg0);
	}

	@Override
	public ListIterator<Bonus> listIterator()
	{
		return this._bonuses.listIterator();
	}

	@Override
	public ListIterator<Bonus> listIterator(int arg0)
	{
		return this._bonuses.listIterator(arg0);
	}

	@Override
	public boolean remove(Object arg0)
	{
		return this._bonuses.remove(arg0);
	}

	@Override
	public Bonus remove(int arg0)
	{
		return this._bonuses.remove(arg0);
	}

	@Override
	public boolean removeAll(Collection<?> arg0)
	{
		return this._bonuses.removeAll(arg0);
	}

	@Override
	public boolean retainAll(Collection<?> arg0)
	{
		return this._bonuses.retainAll(arg0);
	}

	@Override
	public Bonus set(int arg0, Bonus arg1)
	{
		return this._bonuses.set(arg0, arg1);
	}

	@Override
	public int size()
	{
		return this._bonuses.size();
	}

	@Override
	public List<Bonus> subList(int arg0, int arg1)
	{
		return this._bonuses.subList(arg0, arg1);
	}

	@Override
	public Object[] toArray()
	{
		return this._bonuses.toArray();
	}

	@Override
	public <T> T[] toArray(T[] arg0)
	{
		return this._bonuses.toArray(arg0);
	}
	
}
